package com.joymart.product.repo;


import com.joymart.common.data.jdbc.BaseRepository;
import com.joymart.product.model.Product;
import org.springframework.data.jdbc.repository.query.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductRepository extends BaseRepository<Product, String> {
    List<Product> findByDeletedFalseOrderByIdDesc();
    @Query("select id from product where deleted is false and on_market is true order by id desc")
    List<String> findIdByDeletedFalseAndOnMarketTrue();
}
